<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>Insert title here</title>
	<script src="js/jquery-3.2.1.min.js" type="text/javascript" charset="utf-8"></script>

</head>
<body>
	<a href="ts/t.do">11aaa</a><br/>
	
	<form action="login/login.do" method="post">
		<label for="username">用户名</label>
		<input type="text" name="username">
		<label for="password">密码</label>
		<input type="password" name="password">
		<input type="submit">
	</form>
	
	<a href="update/visitor/update.do">11</a><br/>
	
	<button id="btn">jquery button</button>
	<p id="dis">keke</p>
<!--	<form action="update/visitor/update.do" method="post">
		<input type="submit" value="form submit"/>
	</form>-->
	
	
</body>
	<script type="text/javascript">
		
		var user = {"vid":1,"vname":"laoniu"};
		
		$("#btn").click(function(){
			
//			$.post("update/visitor/update.do", 
//			{
//				"vid":1,
//				"vname":"laoniu"
//			}, 
//			function(data){
//				$("#dis").text(data);
//			});
			
			$.post("update/test.do", 
			{
				"vname":"laocheng",
				"vsex":"male"
			},
			function(data){
				$("#dis").text(data);
			});
			
		});
		
		
	</script>

</html>